package com.xintai.caiwu.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xintai.caiwu.mapper.ErpClientmoneyMapper;
import com.xintai.caiwu.domain.ErpClientmoney;
import com.xintai.caiwu.service.IErpClientmoneyService;

/**
 * 客户余额Service业务层处理
 * 
 * @author xintai
 * @date 2021-01-12
 */
@Service
public class ErpClientmoneyServiceImpl implements IErpClientmoneyService 
{
    @Autowired
    private ErpClientmoneyMapper erpClientmoneyMapper;

    /**
     * 查询客户余额
     * 
     * @param cmId 客户余额ID
     * @return 客户余额
     */
    @Override
    public ErpClientmoney selectErpClientmoneyById(Long cmId)
    {
        return erpClientmoneyMapper.selectErpClientmoneyById(cmId);
    }

    /**
     * 查询客户余额列表
     * 
     * @param erpClientmoney 客户余额
     * @return 客户余额
     */
    @Override
    public List<ErpClientmoney> selectErpClientmoneyList(ErpClientmoney erpClientmoney)
    {
        return erpClientmoneyMapper.selectErpClientmoneyList(erpClientmoney);
    }

    /**
     * 新增客户余额
     * 
     * @param erpClientmoney 客户余额
     * @return 结果
     */
    @Override
    public int insertErpClientmoney(ErpClientmoney erpClientmoney)
    {
        return erpClientmoneyMapper.insertErpClientmoney(erpClientmoney);
    }

    /**
     * 修改客户余额
     * 
     * @param erpClientmoney 客户余额
     * @return 结果
     */
    @Override
    public int updateErpClientmoney(ErpClientmoney erpClientmoney)
    {
        return erpClientmoneyMapper.updateErpClientmoney(erpClientmoney);
    }

    /**
     * 批量删除客户余额
     * 
     * @param cmIds 需要删除的客户余额ID
     * @return 结果
     */
    @Override
    public int deleteErpClientmoneyByIds(Long[] cmIds)
    {
        return erpClientmoneyMapper.deleteErpClientmoneyByIds(cmIds);
    }

    /**
     * 删除客户余额信息
     * 
     * @param cmId 客户余额ID
     * @return 结果
     */
    @Override
    public int deleteErpClientmoneyById(Long cmId)
    {
        return erpClientmoneyMapper.deleteErpClientmoneyById(cmId);
    }
}
